var mqtt = require("../utils/mqtt.min.js");

var client = null;
var publish_timeout;
var subscribe_timeout;
var subscribe_multiple_timeout;

var client_state = false; //offline, online
var onMessageArrivedCallBack;
var onConnectionSuccessCallBack;
var onConnectionLostCallBack;

var host = "wxs://bemfa.com:9504/wss";

const options = {
  keepalive: 30,
  ssl: false,
  clean: true,
  protocolVersion: 4,
  username: "123",
  password: "123",
  clientId: "1b79dfa058454105be487a4d510ac5aa",
  reconnectPeriod: 4 * 1000,
  connecTimeout: 3 * 1000,
  will: {
    topic: 'reciot',
    payload: 'reciot',
    qos: 0,
    retain: false
  }
}